<script setup>
import Position from '@/components/Position.vue'
import FooterBorder from '@/components/FooterBorder.vue'
import { useRoute } from 'vue-router';
import { useStore } from 'vuex'
import { computed } from 'vue';

const route = useRoute()
const store = useStore()

const newsDetail = computed(() => store.getters.getNewsListById(route.params.id))

</script>
<template>
    <div class="top-image"></div>
    <Position>
        <template #default>
            布宫动态
        </template>
    </Position>
    <div class="container">
        <div class="bt">
            <a href="#">布宫动态</a>
            <span></span>
        </div>

        <div class="main" v-html="newsDetail.content2"></div>

    </div>
    <FooterBorder></FooterBorder>
</template>
<style scoped>
h1 {
    font-size: 24px;
    font-weight: normal;
    color: #222222;
}

.main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.top-image {
    height: 257px;
    background-image: url('@/assets/news.jpg');
    /* background-size: cover; */
    background-repeat: no-repeat;
    background-position: center center;
}

.container {
    width: 960px;
    margin: 0 auto;
    padding: 60px 0;
}

.bt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 38px;
    /* border: 2px solid #941200; */
    border-top: 2px solid #941200;
    border-bottom: 2px solid #941200;
    margin-bottom: 30px;
}

.bt>span {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    background-image: url('@/assets/more4.gif');
    background-position: center center;
    background-repeat: no-repeat;
}

.bt>a {
    text-decoration: none;
    color: #941200;
    /* background-color: #941200; */
    font-size: 18px;
    width: 96px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}
</style>